<!DOCTYPE html>
<html>

<head>


    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!--360浏览器优先以webkit内核解析-->


    <title>经销商年度拜访报表</title>

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

    </style>

</head>

<body class="white-bg x_sorll" style="padding: 3px;font-size: 13px;">
<div class="page-heade">
    <h2 class="title_color text-center">经销商年度拜访报表</h2>
</div>
<form action="" class="form-inline" id="form1">
    <table class="table table-bordered bud_hei">
        <tr>
            <td class="text-right">分区：</td>
            <td>
                <select name="zoning" id="zoning" class="form-control">
                    <option value="">请选择</option>
                    {volist name="fq" id="row"}
                    <option value="{$row.id}" {if $zoning==$row.id}selected{/if}>{$row.title}</option>
                    {/volist}
                </select>
            </td>
            <td class="text-right">省份：</td>
            <td>
                <select name="provice" id="provice" class="form-control">
                    <option value="">请选择</option>
                </select>
            </td>
            <td class="text-right">城市：</td>
            <td>
                <select name="city" id="city" class="form-control">
                    <option value="">请选择</option>
                </select>
            </td>
        </tr>
        <tr>
            <td class="text-right">年度：</td>
            <td><input type="text" class="form-control" id="year" name="year" value="{$year}"></td>
            <td class="text-right">经销商：</td>
            <td colspan="3"><input type="text" class="form-control" name="jxs" value="{$jxs}"></td>
        </tr>
        <tr>
            <td class="text-center" colspan="6">
                <button class="btn-sm btn-info btn">查询</button>
                <span class="lr_5"></span>
                <button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button>
                <button class="btn btn-sm btn-info" type="button">导出Excel</button>
            </td>
        </tr>
    </table>
</form>
<table class="table table-striped table-bordered table-hover bud_hei text-center">
    <tr class="info">
        <td>分区</td>
        <td>省份</td>
        <td>城市</td>
        <td>经销商</td>
        <td>1月</td>
        <td>2月</td>
        <td>3月</td>
        <td>4月</td>
        <td>5月</td>
        <td>6月</td>
        <td>7月</td>
        <td>8月</td>
        <td>9月</td>
        <td>10月</td>
        <td>11月</td>
        <td>12月</td>
        <td class="trTotal2">年拜访次数</td>
    </tr>
    {volist name="data" id="row"}
    <tr>
        <td>{$row.t4}</td>
        <td>{$row.t3}</td>
        <td>{$row.t2}</td>
        <td>{$row.title}</td>
        <td>{$row.m1}</td>
        <td>{$row.m2}</td>
        <td>{$row.m3}</td>
        <td>{$row.m4}</td>
        <td>{$row.m5}</td>
        <td>{$row.m6}</td>
        <td>{$row.m7}</td>
        <td>{$row.m8}</td>
        <td>{$row.m9}</td>
        <td>{$row.m10}</td>
        <td>{$row.m11}</td>
        <td>{$row.m12}</td>
        <td><a href="{:url('jxsbf/allagencybf')}" class="J_menuItem">{$row.nbfcs}</a></td>
    </tr>
    {/volist}
</table>
 <h5 class="text-center"  style="font-size: 13px;font-weight: 500">
    {$page}
 </h5>
<!--    <h3 class="text-center"><img src="__STATIC__/layout/img/zwsj.png"></h3> -->

<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $(function () {
        $('#zoning').on('change', function () {
            var id = $(this).val()
            $('#provice').load('{:url("Zcity/getprovices")}?id=' + id)
        })
        $('#provice').on('change', function () {
            var id = $(this).val()
            $('#city').load('{:url("Jxsgl/getcities")}?id=' + id)
        })
        $('#city').on('change', function () {
            var id = $(this).val()
            $('#jxs').load('{:url("getjxses")}?id=' + id)
        })
        $('body').on('click', 'input[type=text]', function () {
            this.select()
        })
    })
</script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    laydate.render({
        elem: '#year',
        type: 'year'
    });
    $(document).ready(function () {
        var bgTd = $("table tbody tr td");
        bgTd.each(function () {
            if ($(this).text() == '0') {
                $(this).css('backgroundColor', 'red');
            }
        })

        $('#reset').on('click', function () {
            $("#form1 input").each(function () {
                $(this).val('');
            });
            $("#form1 select").each(function () {
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })

</script>
</body>

</html>